package A1_2;

// Course 类，表示在建筑中进行的一门课程
class Course {
    private String name;
    private Building building; // 约束性注释：课程一定在某个建筑中进行

    public Course(String name, Building building) {
        this.name = name;
        this.building = building; // 确保课程被创建时就关联了一个建筑
    }

    public String getName() {
        return name;
    }

    public Building getBuilding() {
        return building;
    }
}
